#ifndef __MATHTOOLS_RAY3D_H_INCLUDE__
#define __MATHTOOLS_RAY3D_H_INCLUDE__
#include "mathToolsConfig.h"
#include "vec3f.h"

namespace mt
{
	class plane;
	class aabbox3df;
	class ray3df
	{
	public:
		vec3f Position;
		vec3f Direction;

		ray3df() : Position(0, 0, 0), Direction(0, 0, 1) {}
		ray3df(const vec3f& pos, const vec3f& dir) : Position(pos), Direction(dir) {}

		// Comparision operators
		bool operator == (const ray3df& r) const;
		bool operator != (const ray3df& r) const;

		// Ray operations
		/*bool intersects(const DirectX::BoundingSphere& sphere, float& Dist) const;
		bool Intersects(const DirectX::BoundingBox& box, float& Dist) const;*/
		bool intersects(const vec3f & tri0, const vec3f & tri1, const vec3f & tri2, float & Dist) const;
		bool intersects(const plane& plane, float& Dist) const;
		bool intersects(const aabbox3df& box, float& Dist)const;
	};
}


#endif//! __MATHTOOLS_RAY3D_H_INCLUDE__